package com.olddriver.crm.query;

import com.olddriver.crm.util.DateUtil;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Getter
@Setter
public class LogQueryObject extends QueryObject {
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date minTime;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date maxTime;

    public void setMaxTime(Date date) {
        if (date != null) {
            maxTime = DateUtil.getEndDate(date);
        }
    }
}
